<?php
$is_wx = is_wechat_browser();

//判断是否是微信登录函数
function is_wechat_browser()
{
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    if (strpos($user_agent, 'MicroMessenger') === false) {
        return false;
    } else {
        return true;
    }
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script language="javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<title>驴行天下</title>
<SCRIPT LANGUAGE="javascript"> 
function adaptive(){
	var wight=document.body.clientWidth;
	var Height=document.body.clientHeight;
	
	document.getElementById("body").style.display="";
}
function is_wx1(){
	//跳转到浏览器登录界面
	window.location.href='log_the2.php';
}
function is_wx(){
	//弹出弹窗，警告用户，非微信环境下，不允许注册用户
	alert('非微信环境下，不允许注册用户，请在微信中打开该链接，进行注册！');
}
</SCRIPT> 
</head>
<body style="margin:0;padding:0;display:none;background-image:url(picture1/main_baijing.png);background-color:#ffffff;background-repeat:repeat;background-size:cover;" id="body" onload="adaptive()">
	<!--底部两个按钮，登录及注册--->
	<input style="width:44%;height:45px;background-color:#E50011;line-height:45px;color:#FFFFFF;font-family:微软雅黑;font-size:18px;border:0; position:absolute;bottom:20px;text-align:center;border-radius:6px;margin-left:4%;" value="登录" onfocus="this.blur()" onclick="is_wx1();"></input>

	<input style="width:44%;height:45px;background-color:#FFFFFF;line-height:45px;color:#E50011;font-family:微软雅黑;font-size:18px;border:0; position:absolute;bottom:20px;text-align:center;border-radius:6px;margin-left:52%;" value="注册" onfocus="this.blur()" onclick="is_wx();"></input>
</body>